package com.c8a.validation.service;

import com.c8a.validation.entity.Teacher;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;

/**
 * 在没有实现层的情况下必须加上@Validated
 *
 * @Author C8A
 * @Date 2022-04-23 20:39
 * @Email 1912327276@qq.com
 */
@Service
@Validated
public class TeacherService {
    public Teacher teacherService(@Valid Teacher teacher){
        return teacher;
    }
}
